<!--  -->
<template>
  <div >
    <el-table
     :data="tableData"
     border
      stripe
      style="width: 100%">
      <el-table-column
        width="100"
        align="center"
        header-align="center"
        type="index"
        label="序号">
      </el-table-column>
      <el-table-column
        prop="account"
        align="center"
        header-align="center"
        label="账号">
      </el-table-column>
      <el-table-column
        prop="email"
        align="center"
        header-align="center"
        label="邮箱">
      </el-table-column>
      <el-table-column
        prop="mobile"
        align="center"
        header-align="center"
        label="手机号">
      </el-table-column>
      <el-table-column
        prop="job"
        align="center"
        header-align="center"
        label="工作">
      </el-table-column>
      <el-table-column
        prop="name"
        align="center"
        header-align="center"
        label="名字">
      </el-table-column>
      <el-table-column
        align="center"
        header-align="center"
        label="状态">
        <template v-slot="scope">
          <el-tag  v-if="scope.row.status==1">启用</el-tag>
          <el-tag type="info" v-else>禁用</el-tag>
        </template>
      </el-table-column>
      <el-table-column
        align="center"
        width="180"
        header-align="center"
        label="操作">
        <el-button type="primary" icon="el-icon-edit" circle title="修改"></el-button>

        <el-button type="danger" icon="el-icon-delete" circle title="删除"></el-button>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        tableData: []
      }
    },
    created(){
      this.initData();
    },
    methods:{
      initData(){
        this.$api.queryUser({})
        .then(res=>{
          if(res.code===200){
            this.tableData=res.data.list;
          }
        })
      }
    }
  }
</script>
<style lang="scss" scoped>

</style>
